package com.itheima;

import java.math.BigDecimal;

public class Test2 {
    public static void main(String[] args) {
        BigDecimal bd1 = new BigDecimal("9.0");
        BigDecimal bd2 = new BigDecimal("8.0");
        //BigDecimal a = bd1.divide(bd2, 2, BigDecimal.ROUND_UP);
        Double a = bd1.divide(bd2, 2, BigDecimal.ROUND_UP).doubleValue();
        System.out.println(a);
        BigDecimal b = bd1.divide(bd2, 2, BigDecimal.ROUND_FLOOR);
        System.out.println(b);
        BigDecimal c = bd1.divide(bd2, 2, BigDecimal.ROUND_HALF_DOWN);
        System.out.println(c);
    }

}
